package com.niuxiaofa.newlaw.Activity;

import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.niuxiaofa.newlaw.Base.BaseActivity;
import com.niuxiaofa.newlaw.Bean.AdvisoryTagBean;
import com.niuxiaofa.newlaw.Bean.ExpertBean;
import com.niuxiaofa.newlaw.Bean.LocalCitiesBean;
import com.niuxiaofa.newlaw.Bean.LocalProvincesBean;
import com.niuxiaofa.newlaw.Bean.PickerScrollViewBean;
import com.niuxiaofa.newlaw.Network.WisdomLibraryPresenter;
import com.niuxiaofa.newlaw.R;
import com.niuxiaofa.newlaw.Tools.RecyclerViewHelp;
import com.niuxiaofa.newlaw.Tools.UIUtils;
import com.niuxiaofa.newlaw.View.CommonPopWindow;
import com.niuxiaofa.newlaw.View.PickerScrollView;
import com.niuxiaofa.newlaw.adapter.ConnoisseurAdapter;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import butterknife.BindView;


/**
 * 求知币充值
 */
public class RechargeKnowledgeActivity extends BaseActivity {


    @BindView(R.id.coin6)
    LinearLayout coin6;

    @BindView(R.id.coin68)
    LinearLayout coin68;

    @BindView(R.id.coin88)
    LinearLayout coin88;

    @BindView(R.id.coin208)
    LinearLayout coin208;

    @BindView(R.id.coin388)
    LinearLayout coin388;

    @BindView(R.id.coin998)
    LinearLayout coin998;


    List<LinearLayout> list = new ArrayList();

    @Override
    protected int getLayoutId() {
        return R.layout.activity_recharge_coin;
    }

    @Override
    protected void initData() {
        setTitle("求知币充值");
        list.add(coin6);
        list.add(coin68);
        list.add(coin88);
        list.add(coin208);
        list.add(coin388);
        list.add(coin998);

        for (int i = 0; i < list.size(); i++) {
            int finalI = i;
            list.get(i).setOnClickListener(e->{
                setBacground(finalI);
            });
        }




    }

    public void setBacground(int cuurtent) {
        for (int i = 0; i < list.size(); i++) {

            if (i == cuurtent) {
                list.get(cuurtent).setBackgroundResource(R.drawable.shape_yello_circular);
            } else {
                list.get(i).setBackgroundResource(R.drawable.shap_gray_semicircle);
            }
        }
    }

}
